public class Gap {
    private int startX;
    private int width;
    private boolean active = true;

    public Gap(int startX, int width) {
        this.startX = startX;
        this.width = width;
    }

    public boolean isPositionInGap(int position) {
        return active && position >= startX && position < startX + width;
    }

    public boolean isActive() {
        return active;
    }

    public void deactivate() {
        active = false;
    }
}